<extend name="Index::index"/>
<block name="title"><title>添加电影</title></block>
<block name="main">
            <!--右内容区域-->
            <div class="layout-content">

                <div class="page-title">电影管理</div>

                <div class="content-top">
                    <ul class="top-nav">
                        <li class="active"><span>电影添加</span></li>
                    </ul>
                    <div class="clearfix"></div>
                </div>


                <!--content-main start-->
                <div class="container-fluid content-main">
                    <div class="row">
                        <div class="col-md-12">
                            <?php if(isset($_SESSION['message']))
                            {
                                $message=$_SESSION['message'];
                                unset($_SESSION['message']);
                            ?>
                            <div class="ui-tips bg-info">
                                <span class="icon glyphicon glyphicon-info-sign"></span>
                                <span><?php echo $message;?></span>
                            </div>
                            <?php }?>
                        </div>

                            <form action="{:U('add')}" class="form-horizontal" method="post" enctype="multipart/form-data">

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">电影名称</label>
                                    <div class="col-sm-8">
                                        <input type="text" value="<?php echo $name;  ?>" name="name" class="form-control">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">封面图片</label>
                                    <div class="col-sm-8">
                                        <input type="file" name="pic" id="exampleInputFile">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">简介</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="summary" value="<?php echo $summary;  ?>" class="form-control">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">描述</label>
                                    <div class="col-sm-8">
                                        <textarea class="form-control" name="description" rows="3" ><?php echo $description;  ?></textarea>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">评分</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="score" class="form-control" value="<?php echo $score;  ?>">
                                        <span class="help-block">注意：范围（0~10分）</span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">演员列表</label>
                                    <div class="col-sm-8">
                                        <input type="text" name="actore" class="form-control" value="<?php echo $actore;  ?>">
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">上映时间</label>
                                    <div class="col-sm-8">
                                        <input type="date" name="release_at" class="form-control" value="<?php echo $release_at;  ?>">

                                        <span class="help-block">如：2016-08-12</span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">电影时长</label>

                                    <div class="col-sm-8">
                                        <input type="text" name="long" class="form-control" value="<?php echo $long;  ?>">
                                        <span class="help-block">如：120</span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">标签</label>
                                    <div class="col-sm-8">
                                        <?php foreach( \Common\Model\Movie::tagAlias() as $key => $value ){ ?>
                                            <label  class="radio-inline">
                                            <input type="checkbox" name="tags[]"value="{$key}"> {$value}
                                        </label>
                                            <?php } ?>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">语言</label>

                                    <div class="col-sm-8">
                                        <?php foreach( \Common\Model\Movie::langAlias() as $key => $value ){ ?>
                                        <label class="radio-inline">

                                            <input type="radio" name="language" id="inlineRadio1" value="{$key}"> {$value}
                                        </label>
                                            <?php } ?>
                                        <span class="help-block"></span>
                                    </div>
                                </div>

                                <div class="form-group">
                                    <label class="col-sm-2 control-label">状态</label>

                                    <div class="col-sm-8">
                                        <?php foreach( \Common\Model\Movie::statusAlias() as $key => $value ){ ?>
                                        <label class="radio-inline">

                                            <input type="radio" name="status" id="inlineRadio2" value="{$key}"> {$value}
                                        </label>
                                            <?php } ?>
                                        <span class="help-block"></span>
                                    </div>

                                </div>
                                <div class="form-group hide">
                                    <div class="col-sm-offset-2 col-sm-8">
                                        <div class="checkbox">
                                            <label>
                                                <input type="checkbox"> Remember me
                                            </label>
                                        </div>
                                    </div>
                                </div>
                                <div class="form-group">
                                    <div class="col-sm-offset-2 col-sm-8">
                                        <button type="submit" class="btn btn-default">保存提交</button>
                                    </div>
                                </div>
                            </form>


                        </div>
                    </div>

                </div>
                <!--content-main end-->

            </div>
            <!--右内容区域结束-->
</block>
